/****** Object:  Stored Procedure [dbo].spuserInsert Script Date: 11/24/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spuserInsert]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spuserInsert]
GO

/******************************************************************************
**		Name: [dbo].spuserInsert
**		Desc:
**
**		Return values:
**
**		Called by:
**
**		Parameters:
**		Input						Output
**		----------					----------
**
**		Auth: MinhSong
**		Date: 11/24/2012
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**
*******************************************************************************/

CREATE PROCEDURE [dbo].[spuserInsert]
(
	@Username nvarchar(50),
	@Password nvarchar(50),
	@RoleID int,
	@PhoneNumber nvarchar(20),
	@FullName varchar(50),
	@Address nvarchar(100),
	@BirthDate datetime
)
WITH ENCRYPTION

AS

SET NOCOUNT ON

INSERT INTO [tbl_user]
(
	[Username],
	[Password],
	[RoleID],
	[PhoneNumber],
	[FullName],
	[Address],
	[BirthDate]
)
VALUES
(
	@Username,
	@Password,
	@RoleID,
	@PhoneNumber,
	@FullName,
	@Address,
	@BirthDate
)
GO

--GRANT EXECUTE ON [dbo].[spuserInsert] TO [sa]
--GO
